import React from 'react';
import ReactDOM from 'react-dom';
import './assets/css/index.css';
import App from './router/router.jsx';
import * as serviceWorker from './serviceWorker';

// Provider是react-redux兩个核心工具之一，作用：将store传递到每个项目中的组件中
// 第二个工具是connect，在组件中使用
import {Provider} from 'react-redux'
// 引入创建好的store实例
import store from './store/index.js'

ReactDOM.render(
	(
		<Provider store= {store}>
			<App />
		</Provider>
	),
	document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();
